package com.xhs.service;

import com.mybatisflex.core.service.IService;
import com.xhs.dto.request.GetUserParam;
import com.xhs.entity.SysUserEntity;
import com.xhs.message.ReturnResult;

/**
 * @desc: 系统用户表 服务层。
 * @projectName: spring-boot-redis
 * @author: xhs
 * @date: 2024-06-21 021 14:45
 * @version: JDK 1.8
 */
public interface SysUserService extends IService<SysUserEntity> {

    /**
     * 获取所有的key
     *
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> getKey();

    /**
     * 保存String类型的数据
     *
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> saveToString();

    /**
     * 获取String类型的数据
     *
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> getString();

    /**
     * 保存list类型的数据
     *
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> saveToList();

    /**
     * 获取List类型的数据
     *
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> getList();

    /**
     * 保存map类型的数据
     *
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> saveToMap();

    /**
     * 获取map类型的数据
     *
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> getFromMap();

    /**
     * 删除Key
     *
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> delete();

    /**
     * 保存数据
     *
     * @param name 名字
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> setName(String name);

    /**
     * 根据key删除数据
     *
     * @param key key
     * @return ReturnResult<Object>
     */
    ReturnResult<Object> delKeyByName(String key);


    /**
     * 查询用户信息
     *
     * @param param 入参
     * @return ReturnResult<SysUserEntity>
     */
    ReturnResult<SysUserEntity> getUserInfo(GetUserParam param);
}
